<table border="0" cellpadding="1" cellspacing="1">
  <tr> 
	<th  nowrap><?php echo  __("ID", $module) ?> </th>
	<th height="25%" nowrap><?php echo  __("TITOLO", $module) ?> </th>
	<th height="25%" nowrap ><?php echo  __("NOMINATIVO", $module) ?> </th>
	<th width="30%" align="center"><?php echo  __("CATEGORIA", $module) ?></th>
	<th width="20%" align="center"><?php echo __("TELEFONO", $module) ?></th>
	<th width="20%" align="center"><?php echo __("CF", $module) ?></th>
	<th width="20%" align="center"><?php echo __("INDIRIZZO", $module) ?></th>
	<th width="20%" align="center"><?php echo __("PRESSO", $module) ?></th>
	<th width="20%" align="center"><?php echo __("CAP", $module) ?></th>
	<th width="20%" align="center"><?php echo __("CITTA'", $module) ?></th>
	<th width="20%" align="center"><?php echo __("PROVINCIA", $module) ?></th>
	<th width="20%" align="center"><?php echo __("NAZIONE", $module) ?></th>
	<th width="20%" align="center"><?php echo __("NOTE", $module) ?></th>
	<th width="20%" align="center"><?php echo __("EMAIL", $module) ?></th>
	<th width="20%" align="center"><?php echo __("STATO SOSTENITORE", $module) ?></th>
	<th width="20%" align="center"><?php echo __("TESTO ADOZIONE", $module) ?></th>
	<th width="20%" align="center"><?php echo __("RINGRAZIAMENTI", $module) ?></th>
	<th width="20%" align="center"><?php echo __("RICEVUTA FISCALE", $module) ?></th>
	<?php if(isset($rows['0']['importo'])): ?>
	<th width="" align="center"><?php echo __("LORDO", $module) ?></th>
	<th width="" align="center"><?php echo __("IMPORTO", $module) ?></th>
	<?php endif; ?>
 	<?php for($tmp_anno=date('Y')-3; $tmp_anno <= date('Y'); $tmp_anno++): ?>
	<th><?php echo $tmp_anno ?></th>
	<?php endfor; ?>
 </tr>
  <?php if($rows): ?> 
  <?php $i=$start+1;foreach($rows as $row): ?>
    <tr>
	<td ><?php echo $row['id'] ?></td>
	<td ><?php if(isset($row['titolo'])) echo $row['titolo'] ?></td>
	<td ><?php echo $row['nomecognome'] ?></td>
	<td    ><?php echo $row['categoria']; ?> </td>
	<td    ><?php echo $row['tel1']; ?></td>
	<td    ><?php echo $row['cfisc']; ?></td>
	<td    ><?php echo $row['indirizzo'] ?></td>
	<td    ><?php echo $row['presso'] ?></td>
	<td    ><?php echo $row['cap']; ?></td>
	<td    ><?php echo $row['citta']; ?></td>
	<td    ><?php echo $row['prov']; ?></td>
	<td    ><?php echo $row['nazione']; ?></td>
	<td    ><?php echo $row['note']; ?></td>
	<td    ><?php echo $row['email']; ?></td>
	<td    ><?php echo $row['stato_sostenitore']; ?></td>
	<td    ><?php echo $row['adozioni_txt']; ?></td>
	<td    ><?php echo ($row['ringraziamenti'] == 1)? "SI'": "NO"; ?></td>
	<td    ><?php echo ($row['ricevuta_fiscale'] == "S")? "SI'": "NO"; ?></td>
	<?php if(isset($row['importo'])): ?>
	<td align="right"  width="200" ><?php echo format_euro($row['importo']); ?></td>
	
	<td align="right"  width="200" ><?php echo $this->numberstowords->euro2word($row['importo']) ?></td>
	<?php endif; ?>
 	<?php for($tmp_anno=date('Y')-3; $tmp_anno <= date('Y'); $tmp_anno++): ?>
	<td align="right"><?php echo format_euro($this->off->get_offerte_annuali($row['id'], $tmp_anno)) ?></td>
	<?php endfor; ?>
  </tr>
  <?php $i++;endforeach; ?>
  <?php endif;?>
</table>
